<!DOCTYPE HTML>
<html lang="en">
<head>
<title>DriveSpaceFree - Syntax &amp; Usage | AutoHotkey</title>
<meta name="description" content="The DriveSpaceFree command retrieves the free disk space of a drive, in Megabytes." />
<meta name="ahk:equiv-v2" content="commands/DriveGetSpaceFree.htm" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link href="../static/theme.css" rel="stylesheet" type="text/css" />
<script src="../static/content.js" type="text/javascript"></script>
</head>
<body>

<h1>DriveSpaceFree</h1>

<p>Retrieves the free disk space of a drive, in Megabytes.</p>

<pre class="Syntax"><span class="func">DriveSpaceFree</span>, OutputVar, Path</pre>
<h2>Parameters</h2>
<dl>

  <dt>OutputVar</dt>
  <dd><p>The variable in which to store the result, which is rounded down to the nearest whole number.</p></dd>

  <dt>Path</dt>
  <dd><p>Path of drive to receive information from. Since NTFS supports mounted volumes and directory junctions, different amounts of free space might be available in different folders of the same &quot;drive&quot; in some cases.</p></dd>

</dl>

<h2>Remarks</h2>
<p><em>OutputVar</em> is set to the amount of free disk space in Megabytes (rounded down to the nearest Megabyte).</p>
<h2>Related</h2>
<p><a href="Drive.htm">Drive</a>, <a href="DriveGet.htm">DriveGet</a></p>
<h2>Examples</h2>
<div class="ex" id="ExBasic">
<p><a href="#ExBasic">#1</a></p>
<pre>DriveSpaceFree, FreeSpace, c:\</pre>
</div>

</body>
</html>
